#pragma once
#include "GLCommon.h"

class GLDrawable : public GL_FUN
{
public:
	GLDrawable()
	{
		initializeOpenGLFunctions();
	}
	virtual ~GLDrawable() { }

protected:
	bool mInited = false;
};
struct RenderData
{
	QVector<QVector3D>	mVertices;
	GLuint				mVerticesVBO = 0;
	GLuint				mInstanceVBO = 0;
	GLuint				mVAO		 = 0;
	QVector<QMatrix4x4> mInstanceMats;
};
struct RenderDataLine : public RenderData
{

	QColor mColor	  = Qt::red;
	GLuint mLineWidth = 1;
};
struct RenderDataTexture : public RenderData
{
	QOpenGLTexture*	   mTexture = nullptr;
	QVector<QVector2D> mTexCoords;
	GLuint			   mTexCoordsVBO = 0;
};
struct RenderDataBillboard : public RenderDataTexture
{
	QSize mBorderSize = QSize(300, 240);
	QList<QOpenGLTexture*> mTextures;
};
